<?php

class Soul_Model_Query extends Soul_Db_Sql_Query{
	
	private $_modelClass = "";
	
	public function getModelClass(){
		return $this->_modelClass;
	}
	
	public function setModelClass($value){
		$this->_modelClass = $value;
		return $this;
	}

	public function fetchCollection($driver = NULL){
		$dr = parent::fetch($driver);
		$result = new Soul_Model_Collection();
		return $result->setItemClass($this->_modelClass)->fill($dr);
	}	   
	
	public function fillTo(Soul_Model_Collection $list){
		$dr = parent::fetch($driver);
		return $list->fill($dr);
	}	
}